Track

fun SliderDefaults.Track(sliderPositions: SliderPositions, modifier: Modifier = Modifier, colors: SliderColors = colors(), enabled: Boolean = true, waveLength: Dp = SliderDefaults.WaveLength, waveHeight: Dp = SliderDefaults.WaveHeight, waveVelocity: Pair<Dp, WaveDirection> = SliderDefaults.WaveVelocity, waveThickness: Dp = SliderDefaults.WaveThickness, trackThickness: Dp = SliderDefaults.TrackThickness, incremental: Boolean = SliderDefaults.Incremental, animationSpecs: WaveAnimationSpecs = SliderDefaults.WaveAnimationSpecs)

The Default track for WavySlider

Parameters

sliderPositions

SliderPositions which is used to obtain the current active track.

modifier

the Modifier to be applied to the track.

colors

SliderColors that will be used to resolve the colors used for this track in different states. See SliderDefaults.colors.

enabled

controls the enabled state of this WavySlider. When false, this component will not respond to user input, and it will appear visually disabled and disabled to accessibility services.

waveLength

the distance over which the wave's shape repeats.

waveHeight

the total height of the wave (from crest to trough i.e. amplitude * 2). The final rendered height of the wave will be waveHeight + waveThickness.

waveVelocity

the speed per second and movement direction of the whole wave. Setting speed to 0.dp or less stops the movement.

waveThickness

the thickness of the active line (whether animated or not).

trackThickness

the thickness of the inactive line.

incremental

whether to gradually increase height from zero at start to waveHeight at thumb.

animationSpecs

animation configurations used for various properties of the wave.